// src/utils/socket.js
import io from 'socket.io-client';

// 连接后端Socket服务（替换为你的后端地址）
const socket = io('http://localhost:3000');

// 监听连接状态
socket.on('connect', () => {
  console.log('Socket连接成功');
});

socket.on('disconnect', () => {
  console.log('Socket断开连接');
});

export default socket;